package chapter8;

import java.util.LinkedHashSet;

/**
 * 有序的set集合，LinkedHashSet内部使用链表来维护插入的顺序
 */
public class LinkedHashSetTest {
    public static void main(String[] args) {
        LinkedHashSet books = new LinkedHashSet();
        books.add("疯狂Java讲义");
        books.add("轻量级Java EE企业应用实战");
        System.out.println(books);
        books.remove("疯狂Java讲义");
        books.add("疯狂Java讲义");
        System.out.println(books);
    }
}
